package LeetCode;

public class LC_172_FactorialTrailingZeroes {

    public static void main(String[] args) {

    }

    static class Solution {
        public int trailingZeroes(int n) {
            int result = 0;
            long tmp = n;
            for (long i = 5; i <= tmp; i *= 5) {
                result += n / i;
            }
            return result;
        }
    }

}